<!--
 * @Descripttion: 海运柜型操作
 * @version:
 * @Author: Allen
 * @Date: 2021-06-21
 * @LastEditors: Connor
 * @LastEditTime: 2021-06-21 14:56:40
-->
<template>
  <div>
    <table>
      <el-row>
        <span v-if="this.data.status === 1"
          ><el-button type="info" size="mini" @click="containerTypeStatus"
            >禁用</el-button
          >
        </span>
        <span v-if="this.data.status === 0"
          ><el-button type="success" size="mini" @click="containerTypeStatus"
            >启用</el-button
          >
        </span>
      </el-row>
    </table>
  </div>
</template>
<script>
import Table from "../../../../yg/layout/main/page/wrapper/Table.vue";
import { ajax } from "@/store/yg/common/utils";
export default {
  components: { Table },
  props: ["field", "data"],
  data() {
    return {
      containerType: {
        id: "",
        takeDeliveryOfGoodsCount: "",
      },
    };
  },
  mounted() {
    // this.driversSysRemark();
  },
  methods: {
    containerTypeStatus() {
      ajax("containerStatus", this.data).then(
        (res) => {
          if (res.code != 200) {
            this.$message.error("操作失败");
          } else {
            this.$message.success("操作成功");
            setTimeout(() => {
              location.reload();
            }, 2000);
          }
        },
        (error) => {
          console.log(error);
        }
      );
    },
  },
};
</script>
<style scoped></style>

<style lang="scss">
.row-item {
  color: #3f4652;
  line-height: 28px;
  margin-bottom: 14px;
}
</style>
